//
//  RegistrationTypeCell.swift
//  EyeVisionForPatients
//
//  Created by qdsg on 2020/4/20.
//  Copyright © 2020 QDSG. All rights reserved.
//

import UIKit

class SERegistrationTypeCell: UITableViewCell {

    static let className = "SERegistrationTypeCell"
    static let reuseId = className
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    func updateData(model: SERegistrationDeptModel) {
        titleLabel.text = model.name
    }
    

    @IBOutlet weak var titleLabelLeading: NSLayoutConstraint!

    @IBOutlet weak var selectImgView: UIImageView!

    @IBOutlet weak var titleLabel: UILabel!
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        selectImgView.isHidden = !isSelected
        backgroundColor = selected ? .white : .clear
        titleLabel.font = selected ? UIFont.medium(14) : UIFont.regular(14)
        titleLabel.textColor = selected ? Asset.main.color : Asset.textDark.color
        titleLabelLeading.constant = selected ? 35 : 15
    }
    
}
